package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.entity.ShoppingCarts;
import com.example.entity.vo.ShopCartsVo;
import com.example.mapper.ShoppingCartsMapper;
import com.example.service.IShoppingCartsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-09-13
 */
@Service
public class ShoppingCartsServiceImpl extends ServiceImpl<ShoppingCartsMapper, ShoppingCarts> implements IShoppingCartsService {

    @Resource
    ShoppingCartsMapper shoppingCartsMapper;

    @Override
    public List<ShopCartsVo> selectAllByUsrId(Integer usrId) {
        return shoppingCartsMapper.selectAllByUsrId(usrId);
    }

    @Override
    public Boolean updateGoodsId(String shopFig, Integer shopId,Integer shopNumber) {
        return shoppingCartsMapper.updateGoodsId(shopFig, shopId,shopNumber);
    }

    @Override
    public ShopCartsVo selectAllByGoodsId(Integer goodsId,Integer usrId) {
        return shoppingCartsMapper.selectAllByGoodsId(goodsId,usrId);
    }

    @Override
    public ShopCartsVo searchAllByUsrIdShopCartsVo(Integer usrId) {
        return shoppingCartsMapper.searchAllByUsrIdShopCartsVo(usrId);
    }

    @Override
    public List<ShopCartsVo> selectAllByKeeperIdShopCartsVo(Integer usrId) {
        return shoppingCartsMapper.selectAllByKeeperIdShopCartsVo(usrId);
    }

    @Override
    public Boolean checkOutShopByUsrId(Integer usrId) {
        return shoppingCartsMapper.checkOutShopByUsrId(usrId);
    }
}
